<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>随便体验 - 语言学习中心</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3B82F6',
                        secondary: '#10B981',
                        accent: '#8B5CF6',
                        dark: '#1E293B',
                        light: '#F8FAFC'
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .pulse-animation {
                animation: pulse 2s infinite;
            }
            @keyframes pulse {
                0% { transform: scale(1); }
                50% { transform: scale(1.05); }
                100% { transform: scale(1); }
            }
        }
    </style>
</head>
<body class="bg-light text-dark min-h-screen flex flex-col">
<!-- 导航栏 -->
<nav id="navbar" class="fixed w-full bg-white/90 backdrop-blur-sm shadow-sm z-50 transition-all duration-300">
    <div class="container mx-auto px-4 py-3 flex justify-between items-center">
        <a href="index.html" class="flex items-center space-x-2">
            <i class="fa fa-comments text-primary text-2xl"></i>
            <span class="font-bold text-xl text-primary">语言学习中心</span>
        </a>

        <!-- 桌面导航 -->
        <div class="hidden md:flex items-center space-x-8">
            <a href="index.html" class="font-medium text-gray-600 hover:text-primary transition-colors py-1">首页</a>
            <a href="random.html" class="font-medium text-primary border-b-2 border-primary py-1">随便体验</a>
            <a href="english.html" class="font-medium text-gray-600 hover:text-primary transition-colors py-1">英语口语练习</a>
            <a href="history.html" class="font-medium text-gray-600 hover:text-primary transition-colors py-1">历史场景对话</a>
        </div>

        <!-- 移动端菜单按钮 -->
        <button id="menu-toggle" class="md:hidden text-gray-600 focus:outline-none">
            <i class="fa fa-bars text-xl"></i>
        </button>
    </div>

    <!-- 移动端导航菜单 -->
    <div id="mobile-menu" class="md:hidden hidden bg-white border-t">
        <div class="container mx-auto px-4 py-2 flex flex-col space-y-3">
            <a href="index.html" class="font-medium text-gray-600 hover:text-primary transition-colors py-2">首页</a>
            <a href="random.html" class="font-medium text-primary py-2">随便体验</a>
            <a href="english.html" class="font-medium text-gray-600 hover:text-primary transition-colors py-2">英语口语练习</a>
            <a href="history.html" class="font-medium text-gray-600 hover:text-primary transition-colors py-2">历史场景对话</a>
        </div>
    </div>
</nav>

<!-- 主要内容 -->
<main class="flex-grow pt-16">
    <!-- 页面标题 -->
    <section class="bg-gradient-to-r from-blue-400 to-purple-500 text-white py-16 md:py-24">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row items-center justify-between">
                <div>
                    <h1 class="text-[clamp(1.8rem,4vw,3rem)] font-bold mb-4 text-shadow">随便体验</h1>
                    <p class="text-white/90 text-lg max-w-2xl">随机生成各种场景对话，让你在轻松愉快的氛围中练习语言表达能力</p>
                </div>
                <a href="index.html" class="mt-6 md:mt-0 bg-white text-primary hover:bg-gray-100 font-medium px-6 py-3 rounded-lg shadow-md transition-all">
                    <i class="fa fa-home mr-2"></i> 返回首页
                </a>
            </div>
        </div>
    </section>

    <!-- 场景内容区 -->
    <section class="py-16">
        <div class="container mx-auto px-4">
            <div class="max-w-4xl mx-auto">
                <!-- 场景选择器 -->
                <div class="bg-white rounded-xl shadow-md p-6 mb-8">
                    <h2 class="text-xl font-bold mb-4">选择场景类型</h2>
                    <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
                        <button class="scene-type-btn bg-primary/10 text-primary hover:bg-primary/20 py-3 px-4 rounded-lg transition-colors active">
                            <i class="fa fa-random block text-center mb-2"></i>
                            随机
                        </button>
                        <button class="scene-type-btn bg-gray-100 text-gray-600 hover:bg-gray-200 py-3 px-4 rounded-lg transition-colors">
                            <i class="fa fa-coffee block text-center mb-2"></i>
                            日常
                        </button>
                        <button class="scene-type-btn bg-gray-100 text-gray-600 hover:bg-gray-200 py-3 px-4 rounded-lg transition-colors">
                            <i class="fa fa-briefcase block text-center mb-2"></i>
                            职场
                        </button>
                        <button class="scene-type-btn bg-gray-100 text-gray-600 hover:bg-gray-200 py-3 px-4 rounded-lg transition-colors">
                            <i class="fa fa-graduation-cap block text-center mb-2"></i>
                            学习
                        </button>
                    </div>
                </div>

                <!-- 对话场景展示 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                    <div class="bg-gradient-to-r from-blue-400 to-purple-500 text-white p-4">
                        <h3 class="font-bold text-lg">当前场景：咖啡馆点餐</h3>
                    </div>

                    <div class="p-6">
                        <!-- 对话区域 -->
                        <div class="space-y-6 mb-8" id="conversation-area">
                            <div class="flex items-start space-x-4">
                                <div class="w-10 h-10 rounded-full bg-gray-300 flex-shrink-0 overflow-hidden">
                                    <img src="https://picsum.photos/id/1005/100/100" alt="服务员头像" class="w-full h-full object-cover">
                                </div>
                                <div class="bg-gray-100 rounded-lg rounded-tl-none px-4 py-3 max-w-[80%]">
                                    <p class="text-gray-800">您好！欢迎光临，请问需要点些什么？</p>
                                </div>
                            </div>

                            <div class="flex items-start space-x-4 justify-end">
                                <div class="bg-primary text-white rounded-lg rounded-tr-none px-4 py-3 max-w-[80%]">
                                    <p>你好，我想要一杯拿铁和一块巧克力蛋糕，谢谢。</p>
                                </div>
                                <div class="w-10 h-10 rounded-full bg-gray-300 flex-shrink-0 overflow-hidden">
                                    <img src="https://picsum.photos/id/1012/100/100" alt="你的头像" class="w-full h-full object-cover">
                                </div>
                            </div>

                            <div class="flex items-start space-x-4">
                                <div class="w-10 h-10 rounded-full bg-gray-300 flex-shrink-0 overflow-hidden">
                                    <img src="https://picsum.photos/id/1005/100/100" alt="服务员头像" class="w-full h-full object-cover">
                                </div>
                                <div class="bg-gray-100 rounded-lg rounded-tl-none px-4 py-3 max-w-[80%]">
                                    <p class="text-gray-800">好的，一杯拿铁和一块巧克力蛋糕。请问需要大杯还是中杯的拿铁？</p>
                                </div>
                            </div>

                            <div class="flex items-start space-x-4 justify-end opacity-70">
                                <div class="bg-primary/80 text-white rounded-lg rounded-tr-none px-4 py-3 max-w-[80%] pulse-animation">
                                    <p>请给我大杯的，谢谢。</p>
                                </div>
                                <div class="w-10 h-10 rounded-full bg-gray-300 flex-shrink-0 overflow-hidden">
                                    <img src="https://picsum.photos/id/1012/100/100" alt="你的头像" class="w-full h-full object-cover">
                                </div>
                            </div>
                        </div>

                        <!-- 回复输入区 -->
                        <div class="border-t pt-4">
                            <div class="flex space-x-3">
                                <input type="text" placeholder="输入你的回复..." class="flex-grow px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary">
                                <button class="bg-primary hover:bg-primary/90 text-white px-4 py-2 rounded-lg transition-colors">
                                    <i class="fa fa-paper-plane"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 操作按钮 -->
                <div class="flex flex-wrap gap-4 justify-center">
                    <button id="new-scene-btn" class="bg-accent hover:bg-accent/90 text-white font-medium px-6 py-3 rounded-lg shadow-md transition-all transform hover:-translate-y-1 flex items-center">
                        <i class="fa fa-refresh mr-2"></i> 新场景
                    </button>
                    <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium px-6 py-3 rounded-lg transition-all flex items-center">
                        <i class="fa fa-volume-up mr-2"></i> 听对话
                    </button>
                    <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium px-6 py-3 rounded-lg transition-all flex items-center">
                        <i class="fa fa-save mr-2"></i> 保存
                    </button>
                </div>
            </div>
        </div>
    </section>

    <!-- 推荐场景 -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto px-4">
            <h2 class="text-2xl font-bold mb-8 text-center">热门场景推荐</h2>

            <div class="grid grid-cols-1 md:grid-cols-3 gap-6 max-w-4xl mx-auto">
                <div class="bg-white rounded-lg shadow-sm p-4 hover:shadow-md transition-shadow cursor-pointer">
                    <div class="flex items-center space-x-3 mb-2">
                        <i class="fa fa-shopping-bag text-primary text-xl"></i>
                        <h3 class="font-bold">商场购物</h3>
                    </div>
                    <p class="text-gray-600 text-sm">学习在商场购物时的常用对话和表达方式</p>
                </div>

                <div class="bg-white rounded-lg shadow-sm p-4 hover:shadow-md transition-shadow cursor-pointer">
                    <div class="flex items-center space-x-3 mb-2">
                        <i class="fa fa-plane text-primary text-xl"></i>
                        <h3 class="font-bold">机场登机</h3>
                    </div>
                    <p class="text-gray-600 text-sm">掌握机场和飞机上的基本交流用语</p>
                </div>

                <div class="bg-white rounded-lg shadow-sm p-4 hover:shadow-md transition-shadow cursor-pointer">
                    <div class="flex items-center space-x-3 mb-2">
                        <i class="fa fa-cutlery text-primary text-xl"></i>
                        <h3 class="font-bold">餐厅点餐</h3>
                    </div>
                    <p class="text-gray-600 text-sm">学习在餐厅点餐和交流的实用对话</p>
                </div>
            </div>
        </div>
    </section>
</main>

<!-- 页脚 -->
<footer class="bg-dark text-white py-12">
    <div class="container mx-auto px-4">
        <div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
            <div>
                <div class="flex items-center space-x-2 mb-4">
                    <i class="fa fa-comments text-primary text-xl"></i>
                    <span class="font-bold text-lg">语言学习中心</span>
                </div>
                <p class="text-gray-400 mb-4">让语言学习变得更有趣、更高效</p>
                <div class="flex space-x-4">
                    <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                        <i class="fa fa-facebook"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                        <i class="fa fa-twitter"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                        <i class="fa fa-instagram"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                        <i class="fa fa-youtube"></i>
                    </a>
                </div>
            </div>

            <div>
                <h4 class="font-bold text-lg mb-4">快速链接</h4>
                <ul class="space-y-2">
                    <li><a href="index.html" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
                    <li><a href="random.html" class="text-gray-400 hover:text-white transition-colors">随便体验</a></li>
                    <li><a href="english.html" class="text-gray-400 hover:text-white transition-colors">英语口语练习</a></li>
                    <li><a href="history.html" class="text-gray-400 hover:text-white transition-colors">历史场景对话</a></li>
                </ul>
            </div>

            <div>
                <h4 class="font-bold text-lg mb-4">支持</h4>
                <ul class="space-y-2">
                    <li><a href="#" class="text-gray-400 hover:text-white transition-colors">帮助中心</a></li>
                    <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
                    <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
                </ul>
            </div>

            <div>
                <h4 class="font-bold text-lg mb-4">订阅更新</h4>
                <p class="text-gray-400 mb-4">获取最新的学习资源和技巧</p>
                <form class="flex">
                    <input type="email" placeholder="你的邮箱地址" class="px-4 py-2 rounded-l-lg w-full focus:outline-none text-dark">
                    <button type="submit" class="bg-primary hover:bg-primary/90 px-4 py-2 rounded-r-lg transition-colors">
                        <i class="fa fa-paper-plane"></i>
                    </button>
                </form>
            </div>
        </div>

        <div class="border-t border-gray-800 pt-8 text-center text-gray-500">
            <p>&copy; 2023 语言学习中心. 保留所有权利.</p>
        </div>
    </div>
</footer>

<script>
    // 移动端菜单切换
    const menuToggle = document.getElementById('menu-toggle');
    const mobileMenu = document.getElementById('mobile-menu');

    menuToggle.addEventListener('click', () => {
        mobileMenu.classList.toggle('hidden');
    });

    // 导航栏滚动效果
    const navbar = document.getElementById('navbar');

    window.addEventListener('scroll', () => {
        if (window.scrollY > 50) {
            navbar.classList.add('py-2', 'shadow');
            navbar.classList.remove('py-3');
        } else {
            navbar.classList.add('py-3');
            navbar.classList.remove('py-2', 'shadow');
        }
    });

    // 场景类型按钮交互
    const sceneTypeBtns = document.querySelectorAll('.scene-type-btn');
    sceneTypeBtns.forEach(btn => {
        btn.addEventListener('click', () => {
            // 移除所有按钮的active状态
            sceneTypeBtns.forEach(b => {
                b.classList.remove('bg-primary/10', 'text-primary');
                b.classList.add('bg-gray-100', 'text-gray-600');
            });

            // 添加当前按钮的active状态
            btn.classList.remove('bg-gray-100', 'text-gray-600');
            btn.classList.add('bg-primary/10', 'text-primary');
        });
    });

    // 新场景按钮点击事件
    const newSceneBtn = document.getElementById('new-scene-btn');
    newSceneBtn.addEventListener('click', () => {
        // 模拟加载新场景的动画
        newSceneBtn.innerHTML = '<i class="fa fa-circle-o-notch fa-spin mr-2"></i> 加载中...';
        newSceneBtn.disabled = true;

        setTimeout(() => {
            // 恢复按钮状态
            newSceneBtn.innerHTML = '<i class="fa fa-refresh mr-2"></i> 新场景';
            newSceneBtn.disabled = false;

            // 显示成功提示
            alert('已加载新场景！');
        }, 1500);
    });
</script>
</body>
</html>
